<template>
	<view>
		<view class="ha_setup_box">
			<!-- //分润 -->
			<view class="ha_setup" v-if="sign == 1">
				<view class="ha_setup_list">
					<text>政策：</text>
					<ld-select :list="policy_list" label-key="title" value-key="profit_id" placeholder="请选择"
						:whether="true" clearable v-model="policy_title" :category="1" @change="selectChange">
					</ld-select>
				</view>
				<view class="ha_setup_list">
					<text>分润名称：</text>
					<input type="text" v-model="title" placeholder="请输入分润名称">
				</view>
				<view class="ha_setup_list" v-if="policy_id != ''">
					<text>产品：</text>
					<input type="text" :value="product.name" disabled>
				</view>
				<view class="ha_setup_list">
					<text>费率：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.rate_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="rate_text" :category="2"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>交易类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.tran_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="transaction_type_text"
						:category="3" @change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>卡类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.card_type_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="card_type_text" :category="4"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>收款方式：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.channel_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="channel_text" :category="5"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="order" @click="_define">
					确定
				</view>
			</view>
			<!-- 返现 -->
			<view class="ha_setup" v-if="sign == 2">
				<view class="ha_setup_list">
					<text>政策：</text>
					<ld-select :list="policy_list" label-key="title" value-key="cash_id" placeholder="请选择"
						:whether="true" clearable v-model="policy_title" :category="1" @change="selectChange">
					</ld-select>
				</view>
				<view class="ha_setup_list">
					<text>返现名称：</text>
					<input type="text" v-model="title" placeholder="请输入返现名称">
				</view>
				<view class="ha_setup_list" v-if="policy_id != ''">
					<text>产品：</text>
					<input type="text" :value="product.name" disabled>
				</view>
				<view class="ha_setup_list">
					<text>费率：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.rate_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="rate_text" :category="2"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>交易类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.tran_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="transaction_type_text"
						:category="3" @change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>卡类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.card_type_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="card_type_text" :category="4"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>收款方式：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.channel_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="channel_text" :category="5"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>天数限制：</text>
					<input type="number" v-model="getcash.day_limit" disabled>
				</view>
				<view class="ha_setup_list">
					<text>刷卡金额：</text>
					<input type="number" v-model="getcash.money" disabled>
				</view>
				<view class="ha_setup_list" v-if="getcash.reward">
					<text>奖励金额：</text>
					<input type="number" v-model="reward" :placeholder="'请输入0-'+getcash.reward+'的数'" @input="empty">
				</view>
				<view class="order" @click="_Cash">
					确定
				</view>
			</view>
			<!-- 流量卡 -->
			<view class="ha_setup" v-if="sign == 3">
				<view class="ha_setup_list">
					<text>政策：</text>
					<ld-select :list="policy_list" label-key="title" value-key="flow_id" placeholder="请选择"
						:whether="true" clearable v-model="policy_title" :category="1" @change="selectChange">
					</ld-select>
				</view>
				<view class="ha_setup_list">
					<text>流量卡名称：</text>
					<input type="text" v-model="title" placeholder="请输入流量卡名称">
				</view>
				<view class="ha_setup_list" v-if="getflow.reward">
					<text>奖励金额：</text>
					<input type="number" v-model="reward" :placeholder="'请输入0-'+getflow.reward+'的数'" @input="empty">
				</view>
				<view class="ha_setup_list" v-if="policy_id != ''">
					<text>产品：</text>
					<input type="text" :value="product.name" disabled>
				</view>
				<view class="order" @click="_saveFlow">
					确定
				</view>
			</view>
			<!-- 达标 -->
			<view class="ha_setup" v-if="sign == 4">
				<view class="ha_setup_list">
					<text>政策：</text>
					<ld-select :list="policy_lists" label-key="title" value-key="stardard_id" placeholder="请选择"
						:whether="true" clearable v-model="policy_title" :category="1" @change="selectChange">
					</ld-select>
				</view>
				<view class="ha_setup_list" v-if="policy_id != ''">
					<text>产品：</text>
					<input type="text" :value="product.name" disabled>
				</view>
				<view class="ha_setup_list">
					<text>费率：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.rate_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="rate_text" :category="2"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>交易类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.tran_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="transaction_type_text"
						:category="3" @change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>卡类型：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.card_type_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="card_type_text" :category="4"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list">
					<text>收款方式：</text>
					<ld-select v-if="index != null" :multiple="true" :list="data.channel_list" label-key="name"
						value-key="id" :placeholder="placeholder" clearable v-model="channel_text" :category="5"
						@change="selectChange" :disabled="index != null? false : true"></ld-select>
					<input type="text" disabled="" :placeholder="placeholder" v-else>
				</view>
				<view class="ha_setup_list_db" v-if="standard.length>0">
					<text class="tit">奖励设置：</text>
					<view class="" style="display: flex;flex-direction: column;">
						<view class="db_box" v-for="(item,index) in Arr" :key="index">
							<text class="db_tit">{{item.day_limit}}天刷{{item.money}}奖励</text>
							<view class="ha_setup_list_db">
								<text class="_tit">达标名称：</text>
								<input type="text" v-model="item.title" placeholder="请输入达标名称">
							</view>
							<view class="ha_setup_list_db">
								<text class="_tit">奖励金额：</text>
								<input type="number" v-model="item.reward"
									:placeholder="'请输入0-'+standard[index].reward+'的数'" @input="empty(index)">
							</view>
						</view>
					</view>
				</view>
				<view class="order" @click="_Standard">
					确定
				</view>
			</view>
			<!-- 政策 -->
			<view class="ha_setup" v-if="sign == 5">
				<view class="ha_setup_list">
					<text>标题：</text>
					<input type="text" v-model="title" placeholder="请输入标题名称">
				</view>
				<view class="ha_setup_list">
					<text>分润：</text>
					<ld-select :list="frlist" label-key="title" value-key="id" placeholder="请选择" :whether="true"
						clearable v-model="frtext" :category="6" @change="selectChange"></ld-select>
				</view>
				<view class="ha_setup_list">
					<text>返现：</text>
					<ld-select :list="fxlist" label-key="title" value-key="id" placeholder="请选择" :whether="true"
						clearable v-model="fxtext" :category="7" @change="selectChange"></ld-select>
				</view>
				<view class="ha_setup_list">
					<text>流量卡：</text>
					<ld-select :list="llklist" label-key="title" value-key="id" placeholder="请选择" :whether="true"
						clearable v-model="llktext" :category="8" @change="selectChange"></ld-select>
				</view>
				<view class="ha_setup_list">
					<text>达标：</text>
					<ld-select :list="dblist" :multiple="true" label-key="title" value-key="id" placeholder="请选择"
						:whether="true" clearable v-model="dbtext" :category="9" @change="selectChange"></ld-select>
				</view>
				<view class="order" @click="_Policy">
					确定
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import ldSelect from '@/components/ld-select/ld-select.vue';
	export default {
		components: {
			ldSelect
		},
		data() {
			return {
				policy_list: [], //政策
				policy_lists: [],
				policy_title: '',
				policy_id: '', //政策ID
				title: '', //名称
				product: {}, //产品
				rate_ids: '', //费率ID
				rate_text: [], //费率名字
				transaction_type_id: '', //交易类型ID
				transaction_type_text: [], //交易类型名字
				card_type: '', //卡类型ID
				card_type_text: [], //卡类型名字
				channel: '', //收款ID
				channel_text: [], //收款名字
				limit: '', //天数限制
				paybycard: '', //刷卡金额
				reward: '', //奖励金额
				getcash: {}, //返现设置
				getflow: {}, //流量卡设置
				standard: [], //达标设置
				data: [],
				state: false,
				index: null,
				placeholder: '请先选择政策',
				sign: null,
				frlist: [],
				frtext: '',
				frID: '',
				fxlist: [],
				fxtext: '',
				fxID: '',
				llklist: [],
				llktext: '',
				llkID: '',
				dblist: [],
				dbtext: [],
				dbID: '',
				Arr: [],
				page: 1,
				bottom: true,
				profit: null
			}
		},
		computed: {
			// newArr() {
			// 	let _this = this
			// 	let Arr = _this.standard.map(item => ({
			// 		day_limit: item.day_limit,
			// 		money: item.money,
			// 		reward: null,
			// 		title: null,
			// 	}))
			// 	return Arr
			// },
		},
		onLoad(options) {
			this.sign = options.sign
			this.policylist()
			switch (this.sign) {
				case '1':
					//分润设置
					this.urls = 'setting/getProfitList'
					break
				case '2':
					//返现设置
					this.urls = 'setting/getCashList'
					break
				case '3':
					//流量卡设置
					this.urls = 'setting/getFlowList'
					break
				case '4':
					//达标设置
					this.urls = 'setting/getStandardList'
					break
				case '5':
					//政策设置
					this.urls = 'setting/getPolicyList'
					this.fr()
					this.fx()
					this.llk()
					this.db()
					break
			}
		},
		methods: {
			empty(index) {
				let _this = this
				if (_this.sign == 2) {
					if (parseInt(_this.reward) > parseInt(_this.getcash.reward)) {
						uni.showToast({
							title: '超过最大值',
							duration: 2000,
							icon: 'none',
						});
						_this.reward = null
					}
				} else if (_this.sign == 3) {
					if (parseInt(_this.reward) > parseInt(_this.getflow.reward)) {
						uni.showToast({
							title: '超过最大值',
							duration: 2000,
							icon: 'none',
						});
						_this.reward = null
					}
				} else if (_this.sign == 4) {
					if (parseInt(_this.Arr[index].reward) > parseInt(_this.standard[index].reward)) {
						uni.showToast({
							title: '超过最大值',
							duration: 2000,
							icon: 'none',
						});
						_this.Arr[index].reward = null
					}
				}
			},
			// 获取政策列表 
			async policylist() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getSettingPolicy',
					// data: {},
					header: {
						'token': userinfo.token
					},
				});
				this.policy_list = res.data
				let _this = this
				this.policy_list.map(function(item, index) {
					if (item.stardard_id != '') {
						_this.policy_lists[index] = item
					}
				})
			},
			selectChange(val, state, category, index) {
				this.state = state
				if (this.state) {
					this.placeholder = '请选择'
					this.index = index
				} else {
					this.placeholder = '请先选择产品'
				}
				if (category == 1) {
					this.policy_id = val
					switch (this.sign) {
						case '1':
							//分润设置
							this._rate(this.policy_id)
							break
						case '2':
							//返现设置
							let _this = this
							this.policy_list.map(function(item, index) {
								if (item.cash_id == _this.policy_id) {
									_this.profit = item.profit_id
								}
							})
							this.get_cash()
							this._rate(_this.profit)
							break
						case '3':
							//流量卡设置
							let _that = this
							this.policy_list.map(function(item, index) {
								if (item.flow_id == _that.policy_id) {
									_that.profit = item.profit_id
								}
							})
							this.get_flow()
							this._rate(_that.profit)
							break
						case '4':
							//达标设置
							let that_ = this
							this.policy_list.map(function(item, index) {
								if (item.stardard_id == that_.policy_id) {
									that_.profit = item.profit_id
								}
							})
							this.get_standard()
							this._rate(that_.profit)
							break
						case '5':
							//政策设置
							break
					}
				} else if (category == 2) {
					this.rate_ids = val
				} else if (category == 3) {
					this.transaction_type_id = val
				} else if (category == 4) {
					this.card_type = val
				} else if (category == 5) {
					this.channel = val
				} else if (category == 6) {
					this.frID = val
				} else if (category == 7) {
					this.fxID = val
				} else if (category == 8) {
					this.llkID = val
				} else if (category == 9) {
					this.dbID = val
				}
			},
			// 分润添加选项
			async _rate(profit_id) {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					// url: 'setting/getProfitSetting',
					url: 'setting/getSuperProfit',
					data: {
						profit_id: profit_id
					},
					header: {
						'token': userinfo.token
					},
				});
				uni.hideLoading();
				if (res.code == 1) {
					this.data = res.data
					this.product = res.data.product
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			// 保存分润
			_define() {
				if (this.title != '' && this.policy_id != '' && this.product.id != '' && this.rate_ids != '' && this
					.transaction_type_id != '' && this.channel != '' && this.card_type != '') {
					this.define()
				} else {
					uni.showToast({
						title: '信息填写不全',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			async define() {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/saveProfit',
					data: {
						title: this.title,
						profit_id: this.policy_id.toString(),
						product_id: this.product.id.toString(),
						rate_ids: this.rate_ids.toString(),
						transaction_type_id: this.transaction_type_id.toString(),
						channel_id: this.channel.toString(),
						card_type: this.card_type.toString(),
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none',
						success() {
							uni.navigateBack({});
						}
					});
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			//获取返现设置
			async get_cash() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getCashSetting',
					data: {
						cash_id: this.policy_id
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					this.getcash = res.data
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			// 保存返现
			_Cash() {
				if (this.title != '' && this.getcash.day_limit != '' && this.getcash.money != '' && this.reward != '' &&
					this.product.id != '' && this.rate_ids != '' && this
					.transaction_type_id != '' && this.channel != '' && this.card_type != '') {
					this.Cash()
				} else {
					uni.showToast({
						title: '信息填写不全',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			async Cash() {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/saveCash',
					data: {
						title: this.title,
						day_limit: this.getcash.day_limit,
						money: this.getcash.money,
						reward: this.reward,
						product_id: this.product.id.toString(),
						rate_ids: this.rate_ids.toString(),
						transaction_type_ids: this.transaction_type_id.toString(),
						channel_ids: this.channel.toString(),
						card_type: this.card_type.toString(),
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none',
						success() {
							uni.navigateBack({});
						}
					});
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			//获取流量卡设置
			async get_flow() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getFlowSetting',
					data: {
						flow_id: this.policy_id
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					this.getflow = res.data
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			//保存流量卡
			_saveFlow() {
				if (this.title != '' && this.reward != '' && this.product.id != '') {
					this.saveFlow()
				} else {
					uni.showToast({
						title: '信息填写不全',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			async saveFlow() {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/saveFlow',
					data: {
						title: this.title,
						reward: this.reward,
						product_id: this.product.id.toString(),
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none',
						success() {
							uni.navigateBack({});
						}
					});
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			//获取达标设置
			async get_standard() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getStandardSetting',
					data: {
						standard_id: this.policy_id
					},
					header: {
						'token': userinfo.token
					},
				});
				this.Arr = this.newArr
				if (res.code == 1) {
					this.standard = res.data
					this.Arr = this.standard.map(item => ({
						day_limit: item.day_limit,
						money: item.money,
						reward: null,
						title: null,
					}))
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}

			},
			//保存达标设置
			_Standard() {
				if (this.Arr.length > 0 &&
					this.product.id != '' && this.rate_ids != '' && this
					.transaction_type_id != '' && this.channel != '' && this.card_type != '') {
					this.Standard()
				} else {
					uni.showToast({
						title: '信息填写不全',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			async Standard() {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/saveStandards',
					data: {
						data: this.Arr,
						product_id: this.product.id.toString(),
						rate_ids: this.rate_ids.toString(),
						transaction_type_ids: this.transaction_type_id.toString(),
						channel_ids: this.channel.toString(),
						card_type: this.card_type.toString(),
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none',
						success() {
							uni.navigateBack({});
						}
					});
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			//保存政策
			_Policy() {
				if (this.title != '' && this.frID != '' && this.fxID != '' && this.llkID != '') {
					this.Policy()
				} else {
					uni.showToast({
						title: '信息填写不全',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			async Policy() {
				uni.showLoading({
					title: '加载中'
				});
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/savePolicy',
					data: {
						title: this.title,
						profit_id: this.frID,
						cash_id: this.fxID,
						flow_id: this.llkID,
						standard_id: this.dbID
					},
					header: {
						'token': userinfo.token
					},
				});
				if (res.code == 1) {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none',
						success() {
							uni.navigateBack({});
						}
					});
				} else {
					uni.showToast({
						title: res.msg,
						duration: 2000,
						icon: 'none'
					});
				}
			},
			// 分润列表
			async fr() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getProfitList',
					data: {
						// token: 'fc62f657-6904-4cb1-abf9-14e9137e8442',
						page: this.page,
						page_size: 15
					},
					header: {
						'token': userinfo.token
					},
				});
				this.frlist = res.data.data
			},
			// 返现列表
			async fx() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getCashList',
					data: {
						// token: 'fc62f657-6904-4cb1-abf9-14e9137e8442',
						page: 1,
						page_size: 15
					},
					header: {
						'token': userinfo.token
					},
				});
				this.fxlist = res.data.data
			},
			// 流量卡列表
			async llk() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getFlowList',
					data: {
						// token: 'fc62f657-6904-4cb1-abf9-14e9137e8442',
						page: 1,
						page_size: 15
					},
					header: {
						'token': userinfo.token
					},
				});
				this.llklist = res.data.data
			},
			// 达标列表
			async db() {
				const userinfo = uni.getStorageSync('userinfo');
				const {
					data: res
				} = await this.$myHttp5({
					url: 'setting/getStandardList',
					data: {
						// token: 'fc62f657-6904-4cb1-abf9-14e9137e8442',
						page: 1,
						page_size: 15
					},
					header: {
						'token': userinfo.token
					},
				});
				this.dblist = res.data.data
			},
		}
	}
</script>

<style lang="scss" scoped>
	.ha_setup_box {
		padding: 30rpx;

		.ha_setup {
			.ha_setup_list {
				margin-bottom: 20rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				text {
					display: block;
					width: 30%;
					text-align: end;
					font-size: 24rpx;
					color: #b1b1b1;
				}

				input {
					flex: 1;
					padding: 10rpx;
					border: 1px solid #eee;
					border-radius: 10rpx;
				}
			}

			.ha_setup_list_db {
				margin-bottom: 20rpx;
				display: flex;

				.tit {
					display: flex;
					width: 30%;
					justify-content: flex-end;
					font-size: 24rpx;
					color: #b1b1b1;
				}

				._tit {
					display: flex;
					width: 30%;
					justify-content: flex-end;
					align-items: center;
					font-size: 24rpx;
					color: #b1b1b1;
				}

				.db_box {
					width: 100%;
					border: #1688f1 1px solid;
					border-radius: 15rpx;
					overflow: hidden;
					margin-bottom: 30rpx;

					.db_tit {
						display: block;
						width: 100%;
						padding: 10rpx 20rpx;
						margin-bottom: 30rpx;
						box-sizing: border-box;
						background-color: #d9edf7;
						color: #1688f1;
					}

					input {
						padding: 10rpx;
						border: 1px solid #eee;
						border-radius: 10rpx;
					}
				}

			}
		}
	}

	.order {
		padding: 20rpx;
		box-sizing: border-box;
		width: 80%;
		margin: 100rpx auto;
		border-radius: 50rpx;
		background-color: #1688f1;
		color: #fff;
		text-align: center;
	}
</style>